#!/bin/bash

set -ex

function setup_loongarch_env()
{
	echo "====>setup env for LoongArch..."
	CC_PREFIX=/opt/loongarch64-linux-gnu-gcc13.3

	export PATH=$CC_PREFIX/bin:$PATH
	export LD_LIBRARY_PATH=$CC_PREFIX/lib:$LD_LIBRARY_PATH
	export LD_LIBRARY_PATH=$CC_PREFIX/loongarch64-linux-gnu/lib64:$LD_LIBRARY_PATH

	export ARCH=loongarch
	export CROSS_COMPILE=loongarch64-linux-gnu-
}

setup_loongarch_env
